package com.whitema.test9;

import java.util.Random;

public class Yzm {
    public static String getLoginCode() {
        String codes = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        Random random = new Random();
        StringBuilder code = new StringBuilder(4);

        for (int i = 0; i < 4; i++) {
            int index = random.nextInt(codes.length());
            code.append(codes.charAt(index));
        }

        return code.toString();
    }
}
